Fix argument name highlighting in 'describe-function' output
authorEshel Yaron <me@eshelyaron.com>
Thu, 23 May 2024 19:59:38 +0000 (21:59 +0200)
committerEshel Yaron <me@eshelyaron.com>
Thu, 23 May 2024 20:14:14 +0000 (22:14 +0200)
commit9d3fb195af40f26a3751c368af55677667af3eba
tree55f66d6487b5bb12b67526557f5bcbe89a1216c7
parent52acabcbe8eeb688640e18884ba8a15635ca7062
Fix argument name highlighting in 'describe-function' output

This fixes a regression introduced in
dd38097f0b9458eea882043fa06b27248e505b22, which prevented proper
argument name highlighting in function docstrings in the output
buffer of 'describe-function'.

* lisp/help-fns.el (help-do-arg-highlight): New optional arg
that says if we're highlighting arguments in the usage string or
in the docstring.  Tweak generated regex to only expect argument
name to be preceded by function name in usage string.
(help-highlight-arguments): Use new argument for usage string.
lisp/help-fns.el